// $Id$
// vim:ft=javascript

ARG_WITH("wddx", "WDDX support", "yes");

if (PHP_WDDX == "yes" &&
	PHP_LIBXML == "yes" &&
	CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS_WDDX", PHP_PHP_BUILD + "\\include\\libxml2")
) {
	EXTENSION("wddx", "wddx.c");
	AC_DEFINE("HAVE_WDDX", 1, "WDDX support");

	if (!PHP_WDDX_SHARED) {
		ADD_FLAG("CFLAGS_WDDX", "/D LIBXML_STATIC");
	} else {
		if (!CHECK_LIB("libxml2.lib", "wddx")) {
			WARNING("wddx support can't be enabled, libxml is not found")
		}
	}

	ADD_EXTENSION_DEP('wddx', 'libxml');
	ADD_EXTENSION_DEP('wddx', 'xml')
	CHECK_HEADER_ADD_INCLUDE("timelib_config.h", "CFLAGS_WDDX", "ext/date/lib");
}


